import request from '@/utils/request'

export const getAll = () => request.get('/complain/getAll')

export const getById = (id) => request.get('/complain/getById', { params: { id } })

export const add = (data) => request.post('/complain/addComplain', { ...data })

export const update = (data) =>
   request.put('/complain/updateComplain', data)

export const deleteById = (id) =>
   request.delete('/complain/deleteComplain', { params: { id } })

export const getLike = (keywords) => request.get('/complain/getLike', { params: { keywords } })